//
//  SDNetRequestFactory.h
//  SDDataTest
//
//  Created by ding wei on 12-10-4.
//  Copyright (c) 2012年 sodao. All rights reserved.
//

#import <Foundation/Foundation.h>

#define RequestParams_URI           @"url"
#define RequestParams_getParams     @"get"
#define RequestParams_postParams    @"postParam"
#define RequestParams_restParams    @"restParam"
#define RequestParams_type          @"type"
#define RequestBaseTestURL          @"TestURL"
#define RequestBaseURL              @"BaseURL"
#define RequestAppKey               @"appkey"
#define RequestToken                @"AppToken"

typedef enum RequestType{
    RequestType_Get = 1,
    RequestType_Post = 2,
    RequestType_Rest =3,
    RequestType_GetRest = 4,
    RequestType_PostRest = 5
}RequestType;

@interface SDNetURLMap : NSObject
{
    NSMutableDictionary* urlAndParams;
    NSString* _APPKey;
    NSString* _token;
    NSString* _baseTestURL;
    NSString* _baseURL;
}

@property (nonatomic, retain) NSString* APPKey;
@property (nonatomic, retain) NSString* token;
@property (nonatomic, retain) NSString* baseTestURL;
@property (nonatomic, retain) NSString* baseURL;

-(NSString*)uriByKey:(NSString*)key;
-(RequestType)typeByKey:(NSString*)key;
-(NSArray*)getParams:(NSString*)key;
-(NSArray*)postParams:(NSString*)key;
-(NSArray*)restParams:(NSString*)key;

@end
